package com.guoranhao.business.model;

import com.guoranhao.tool.model.BaseModel;
import com.guoranhao.tool.model.FieldComment;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotNull;

@Data
@Accessors(chain = true)
public class PostExtends extends BaseModel {
    /**
     * 帖子id
     */
    @FieldComment(value="帖子id")
    @NotNull(message="帖子id")
    private Long postId;

    /**
     * 帖子类型0:图文帖,1:视频帖
     */
    @FieldComment(value="帖子类型0")
    @NotNull(message="帖子类型0")
    private Integer postType;

    /**
     * 帖子真实浏览数
     */
    @FieldComment(value="帖子真实浏览数")
    private Integer showRealCount;

    /**
     * 帖子浏览数
     */
    @FieldComment(value="帖子浏览数")
    private Integer showCount;

    /**
     * 帖子分享数
     */
    @FieldComment(value="帖子分享数")
    private Integer shareCount;

    /**
     * 帖子收藏数
     */
    @FieldComment(value="帖子收藏数")
    private Integer collectCount;

    /**
     * 帖子回复数
     */
    @FieldComment(value="帖子回复数")
    private Integer replyCount;

    /**
     * 帖子点赞数
     */
    @FieldComment(value="帖子点赞数")
    private Integer praiseCount;

    public void initWithDefaultValue() {
        this.postType = 0;
        this.showRealCount = 0;
        this.showCount = 0;
        this.shareCount = 0;
        this.collectCount = 0;
        this.replyCount = 0;
        this.praiseCount = 0;
    }
}